home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / newconf / IPCCLEAN / ipcclean.ultri < prev   
Encoding:
Text File  |  1992-08-27  |  514 b   |  23 lines

  1. #!/bin/sh
  2.  
  3. MACHINE=dec
  4.  
  5. if (test $MACHINE = seq)
  6. then
  7.     IPCS=/usr/att/bin/ipcs
  8.     $IPCS | egrep '^m .*|^s .*' | egrep "`whoami`|postgres|picasso" | \
  9.     /bin/awk '{printf "/usr/att/bin/ipcrm -%s %s\n", $1, $2}' '-' > /tmp/ipcclean.$$
  10. else
  11.     IPCS=/usr/bin/ipcs
  12.     $IPCS | egrep '^m .*|^s .*' | egrep "`whoami`|postgres|picasso" | \
  13.     /bin/awk '{printf "ipcrm -%s %s\n", $1, $2}' '-' > /tmp/ipcclean.$$
  14. fi
  15.  
  16.  
  17. chmod +x /tmp/ipcclean.$$
  18. if (test -s /tmp/ipcclean.$$)
  19. then
  20.     /tmp/ipcclean.$$
  21. fi
  22. rm -f /tmp/ipcclean.$$
  23.